<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>LCOV - ged.info - /usr/include/c++/4.3.2/bits/stl_map.h</title>
  <link rel="stylesheet" type="text/css" href="../../../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LTP GCOV extension - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
        <tr>
          <td class="headerItem" width="20%">Current&nbsp;view:</td>
          <td class="headerValue" width="80%" colspan=4><a href="../../../../../index.html">directory</a> - <a href="index.html">usr/include/c++/4.3.2/bits</a> - stl_map.h</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Test:</td>
          <td class="headerValue" width="80%" colspan=4>ged.info</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Date:</td>
          <td class="headerValue" width="20%">2009-06-09</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Instrumented&nbsp;lines:</td>
          <td class="headerValue" width="20%">32</td>
        </tr>
        <tr>
          <td class="headerItem" width="20%">Code&nbsp;covered:</td>
          <td class="headerValue" width="20%">81.2 %</td>
          <td width="20%"></td>
          <td class="headerItem" width="20%">Executed&nbsp;lines:</td>
          <td class="headerValue" width="20%">26</td>
        </tr>
        </table>
      </td>
    </tr>
    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td><pre class="source">
<span class="lineNum">       1 </span>                : // Map implementation -*- C++ -*-
<span class="lineNum">       2 </span>                : 
<span class="lineNum">       3 </span>                : // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
<span class="lineNum">       4 </span>                : // Free Software Foundation, Inc.
<span class="lineNum">       5 </span>                : //
<span class="lineNum">       6 </span>                : // This file is part of the GNU ISO C++ Library.  This library is free
<span class="lineNum">       7 </span>                : // software; you can redistribute it and/or modify it under the
<span class="lineNum">       8 </span>                : // terms of the GNU General Public License as published by the
<span class="lineNum">       9 </span>                : // Free Software Foundation; either version 2, or (at your option)
<span class="lineNum">      10 </span>                : // any later version.
<span class="lineNum">      11 </span>                : 
<span class="lineNum">      12 </span>                : // This library is distributed in the hope that it will be useful,
<span class="lineNum">      13 </span>                : // but WITHOUT ANY WARRANTY; without even the implied warranty of
<span class="lineNum">      14 </span>                : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
<span class="lineNum">      15 </span>                : // GNU General Public License for more details.
<span class="lineNum">      16 </span>                : 
<span class="lineNum">      17 </span>                : // You should have received a copy of the GNU General Public License along
<span class="lineNum">      18 </span>                : // with this library; see the file COPYING.  If not, write to the Free
<span class="lineNum">      19 </span>                : // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
<span class="lineNum">      20 </span>                : // USA.
<span class="lineNum">      21 </span>                : 
<span class="lineNum">      22 </span>                : // As a special exception, you may use this file as part of a free software
<span class="lineNum">      23 </span>                : // library without restriction.  Specifically, if other files instantiate
<span class="lineNum">      24 </span>                : // templates or use macros or inline functions from this file, or you compile
<span class="lineNum">      25 </span>                : // this file and link it with other files to produce an executable, this
<span class="lineNum">      26 </span>                : // file does not by itself cause the resulting executable to be covered by
<span class="lineNum">      27 </span>                : // the GNU General Public License.  This exception does not however
<span class="lineNum">      28 </span>                : // invalidate any other reasons why the executable file might be covered by
<span class="lineNum">      29 </span>                : // the GNU General Public License.
<span class="lineNum">      30 </span>                : 
<span class="lineNum">      31 </span>                : /*
<span class="lineNum">      32 </span>                :  *
<span class="lineNum">      33 </span>                :  * Copyright (c) 1994
<span class="lineNum">      34 </span>                :  * Hewlett-Packard Company
<span class="lineNum">      35 </span>                :  *
<span class="lineNum">      36 </span>                :  * Permission to use, copy, modify, distribute and sell this software
<span class="lineNum">      37 </span>                :  * and its documentation for any purpose is hereby granted without fee,
<span class="lineNum">      38 </span>                :  * provided that the above copyright notice appear in all copies and
<span class="lineNum">      39 </span>                :  * that both that copyright notice and this permission notice appear
<span class="lineNum">      40 </span>                :  * in supporting documentation.  Hewlett-Packard Company makes no
<span class="lineNum">      41 </span>                :  * representations about the suitability of this software for any
<span class="lineNum">      42 </span>                :  * purpose.  It is provided &quot;as is&quot; without express or implied warranty.
<span class="lineNum">      43 </span>                :  *
<span class="lineNum">      44 </span>                :  *
<span class="lineNum">      45 </span>                :  * Copyright (c) 1996,1997
<span class="lineNum">      46 </span>                :  * Silicon Graphics Computer Systems, Inc.
<span class="lineNum">      47 </span>                :  *
<span class="lineNum">      48 </span>                :  * Permission to use, copy, modify, distribute and sell this software
<span class="lineNum">      49 </span>                :  * and its documentation for any purpose is hereby granted without fee,
<span class="lineNum">      50 </span>                :  * provided that the above copyright notice appear in all copies and
<span class="lineNum">      51 </span>                :  * that both that copyright notice and this permission notice appear
<span class="lineNum">      52 </span>                :  * in supporting documentation.  Silicon Graphics makes no
<span class="lineNum">      53 </span>                :  * representations about the suitability of this software for any
<span class="lineNum">      54 </span>                :  * purpose.  It is provided &quot;as is&quot; without express or implied warranty.
<span class="lineNum">      55 </span>                :  */
<span class="lineNum">      56 </span>                : 
<span class="lineNum">      57 </span>                : /** @file stl_map.h
<span class="lineNum">      58 </span>                :  *  This is an internal header file, included by other library headers.
<span class="lineNum">      59 </span>                :  *  You should not attempt to use it directly.
<span class="lineNum">      60 </span>                :  */
<span class="lineNum">      61 </span>                : 
<span class="lineNum">      62 </span>                : #ifndef _STL_MAP_H
<span class="lineNum">      63 </span>                : #define _STL_MAP_H 1
<span class="lineNum">      64 </span>                : 
<span class="lineNum">      65 </span>                : #include &lt;bits/functexcept.h&gt;
<span class="lineNum">      66 </span>                : #include &lt;bits/concept_check.h&gt;
<span class="lineNum">      67 </span>                : 
<span class="lineNum">      68 </span>                : _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)
<span class="lineNum">      69 </span>                : 
<span class="lineNum">      70 </span>                :   /**
<span class="lineNum">      71 </span>                :    *  @brief A standard container made up of (key,value) pairs, which can be
<span class="lineNum">      72 </span>                :    *  retrieved based on a key, in logarithmic time.
<span class="lineNum">      73 </span>                :    *
<span class="lineNum">      74 </span>                :    *  @ingroup Containers
<span class="lineNum">      75 </span>                :    *  @ingroup Assoc_containers
<span class="lineNum">      76 </span>                :    *
<span class="lineNum">      77 </span>                :    *  Meets the requirements of a &lt;a href=&quot;tables.html#65&quot;&gt;container&lt;/a&gt;, a
<span class="lineNum">      78 </span>                :    *  &lt;a href=&quot;tables.html#66&quot;&gt;reversible container&lt;/a&gt;, and an
<span class="lineNum">      79 </span>                :    *  &lt;a href=&quot;tables.html#69&quot;&gt;associative container&lt;/a&gt; (using unique keys).
<span class="lineNum">      80 </span>                :    *  For a @c map&lt;Key,T&gt; the key_type is Key, the mapped_type is T, and the
<span class="lineNum">      81 </span>                :    *  value_type is std::pair&lt;const Key,T&gt;.
<span class="lineNum">      82 </span>                :    *
<span class="lineNum">      83 </span>                :    *  Maps support bidirectional iterators.
<span class="lineNum">      84 </span>                :    *
<span class="lineNum">      85 </span>                :    *  The private tree data is declared exactly the same way for map and
<span class="lineNum">      86 </span>                :    *  multimap; the distinction is made entirely in how the tree functions are
<span class="lineNum">      87 </span>                :    *  called (*_unique versus *_equal, same as the standard).
<span class="lineNum">      88 </span>                :   */
<span class="lineNum">      89 </span>                :   template &lt;typename _Key, typename _Tp, typename _Compare = std::less&lt;_Key&gt;,
<span class="lineNum">      90 </span>                :             typename _Alloc = std::allocator&lt;std::pair&lt;const _Key, _Tp&gt; &gt; &gt;
<span class="lineNum">      91 </span>                :     class map
<span class="lineNum">      92 </span><span class="lineCov">              6 :     {</span>
<span class="lineNum">      93 </span>                :     public:
<span class="lineNum">      94 </span>                :       typedef _Key                                          key_type;
<span class="lineNum">      95 </span>                :       typedef _Tp                                           mapped_type;
<span class="lineNum">      96 </span>                :       typedef std::pair&lt;const _Key, _Tp&gt;                    value_type;
<span class="lineNum">      97 </span>                :       typedef _Compare                                      key_compare;
<span class="lineNum">      98 </span>                :       typedef _Alloc                                        allocator_type;
<span class="lineNum">      99 </span>                : 
<span class="lineNum">     100 </span>                :     private:
<span class="lineNum">     101 </span>                :       // concept requirements
<span class="lineNum">     102 </span>                :       typedef typename _Alloc::value_type                   _Alloc_value_type;
<span class="lineNum">     103 </span>                :       __glibcxx_class_requires(_Tp, _SGIAssignableConcept)
<span class="lineNum">     104 </span>                :       __glibcxx_class_requires4(_Compare, bool, _Key, _Key,
<span class="lineNum">     105 </span>                :                                 _BinaryFunctionConcept)
<span class="lineNum">     106 </span>                :       __glibcxx_class_requires2(value_type, _Alloc_value_type, _SameTypeConcept)
<span class="lineNum">     107 </span>                : 
<span class="lineNum">     108 </span>                :     public:
<span class="lineNum">     109 </span>                :       class value_compare
<span class="lineNum">     110 </span>                :       : public std::binary_function&lt;value_type, value_type, bool&gt;
<span class="lineNum">     111 </span>                :       {
<span class="lineNum">     112 </span>                :         friend class map&lt;_Key, _Tp, _Compare, _Alloc&gt;;
<span class="lineNum">     113 </span>                :       protected:
<span class="lineNum">     114 </span>                :         _Compare comp;
<span class="lineNum">     115 </span>                : 
<span class="lineNum">     116 </span>                :         value_compare(_Compare __c)
<span class="lineNum">     117 </span>                :         : comp(__c) { }
<span class="lineNum">     118 </span>                : 
<span class="lineNum">     119 </span>                :       public:
<span class="lineNum">     120 </span>                :         bool operator()(const value_type&amp; __x, const value_type&amp; __y) const
<span class="lineNum">     121 </span>                :         { return comp(__x.first, __y.first); }
<span class="lineNum">     122 </span>                :       };
<span class="lineNum">     123 </span>                : 
<span class="lineNum">     124 </span>                :     private:
<span class="lineNum">     125 </span>                :       /// This turns a red-black tree into a [multi]map. 
<span class="lineNum">     126 </span>                :       typedef typename _Alloc::template rebind&lt;value_type&gt;::other 
<span class="lineNum">     127 </span>                :         _Pair_alloc_type;
<span class="lineNum">     128 </span>                : 
<span class="lineNum">     129 </span>                :       typedef _Rb_tree&lt;key_type, value_type, _Select1st&lt;value_type&gt;,
<span class="lineNum">     130 </span>                :                        key_compare, _Pair_alloc_type&gt; _Rep_type;
<span class="lineNum">     131 </span>                : 
<span class="lineNum">     132 </span>                :       /// The actual tree structure.
<span class="lineNum">     133 </span>                :       _Rep_type _M_t;
<span class="lineNum">     134 </span>                : 
<span class="lineNum">     135 </span>                :     public:
<span class="lineNum">     136 </span>                :       // many of these are specified differently in ISO, but the following are
<span class="lineNum">     137 </span>                :       // &quot;functionally equivalent&quot;
<span class="lineNum">     138 </span>                :       typedef typename _Pair_alloc_type::pointer         pointer;
<span class="lineNum">     139 </span>                :       typedef typename _Pair_alloc_type::const_pointer   const_pointer;
<span class="lineNum">     140 </span>                :       typedef typename _Pair_alloc_type::reference       reference;
<span class="lineNum">     141 </span>                :       typedef typename _Pair_alloc_type::const_reference const_reference;
<span class="lineNum">     142 </span>                :       typedef typename _Rep_type::iterator               iterator;
<span class="lineNum">     143 </span>                :       typedef typename _Rep_type::const_iterator         const_iterator;
<span class="lineNum">     144 </span>                :       typedef typename _Rep_type::size_type              size_type;
<span class="lineNum">     145 </span>                :       typedef typename _Rep_type::difference_type        difference_type;
<span class="lineNum">     146 </span>                :       typedef typename _Rep_type::reverse_iterator       reverse_iterator;
<span class="lineNum">     147 </span>                :       typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
<span class="lineNum">     148 </span>                : 
<span class="lineNum">     149 </span>                :       // [23.3.1.1] construct/copy/destroy
<span class="lineNum">     150 </span>                :       // (get_allocator() is normally listed in this section, but seems to have
<span class="lineNum">     151 </span>                :       // been accidentally omitted in the printed standard)
<span class="lineNum">     152 </span>                :       /**
<span class="lineNum">     153 </span>                :        *  @brief  Default constructor creates no elements.
<span class="lineNum">     154 </span>                :        */
<span class="lineNum">     155 </span><span class="lineCov">              6 :       map()</span>
<span class="lineNum">     156 </span><span class="lineCov">              6 :       : _M_t() { }</span>
<span class="lineNum">     157 </span>                : 
<span class="lineNum">     158 </span>                :       /**
<span class="lineNum">     159 </span>                :        *  @brief  Creates a %map with no elements.
<span class="lineNum">     160 </span>                :        *  @param  comp  A comparison object.
<span class="lineNum">     161 </span>                :        *  @param  a  An allocator object.
<span class="lineNum">     162 </span>                :        */
<span class="lineNum">     163 </span>                :       explicit
<span class="lineNum">     164 </span>                :       map(const _Compare&amp; __comp,
<span class="lineNum">     165 </span>                :           const allocator_type&amp; __a = allocator_type())
<span class="lineNum">     166 </span>                :       : _M_t(__comp, __a) { }
<span class="lineNum">     167 </span>                : 
<span class="lineNum">     168 </span>                :       /**
<span class="lineNum">     169 </span>                :        *  @brief  %Map copy constructor.
<span class="lineNum">     170 </span>                :        *  @param  x  A %map of identical element and allocator types.
<span class="lineNum">     171 </span>                :        *
<span class="lineNum">     172 </span>                :        *  The newly-created %map uses a copy of the allocation object
<span class="lineNum">     173 </span>                :        *  used by @a x.
<span class="lineNum">     174 </span>                :        */
<span class="lineNum">     175 </span>                :       map(const map&amp; __x)
<span class="lineNum">     176 </span>                :       : _M_t(__x._M_t) { }
<span class="lineNum">     177 </span>                : 
<span class="lineNum">     178 </span>                : #ifdef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     179 </span>                :       /**
<span class="lineNum">     180 </span>                :        *  @brief  %Map move constructor.
<span class="lineNum">     181 </span>                :        *  @param  x  A %map of identical element and allocator types.
<span class="lineNum">     182 </span>                :        *
<span class="lineNum">     183 </span>                :        *  The newly-created %map contains the exact contents of @a x.
<span class="lineNum">     184 </span>                :        *  The contents of @a x are a valid, but unspecified %map.
<span class="lineNum">     185 </span>                :        */
<span class="lineNum">     186 </span>                :       map(map&amp;&amp; __x)
<span class="lineNum">     187 </span>                :       : _M_t(std::forward&lt;_Rep_type&gt;(__x._M_t)) { }
<span class="lineNum">     188 </span>                : #endif
<span class="lineNum">     189 </span>                : 
<span class="lineNum">     190 </span>                :       /**
<span class="lineNum">     191 </span>                :        *  @brief  Builds a %map from a range.
<span class="lineNum">     192 </span>                :        *  @param  first  An input iterator.
<span class="lineNum">     193 </span>                :        *  @param  last  An input iterator.
<span class="lineNum">     194 </span>                :        *
<span class="lineNum">     195 </span>                :        *  Create a %map consisting of copies of the elements from [first,last).
<span class="lineNum">     196 </span>                :        *  This is linear in N if the range is already sorted, and NlogN
<span class="lineNum">     197 </span>                :        *  otherwise (where N is distance(first,last)).
<span class="lineNum">     198 </span>                :        */
<span class="lineNum">     199 </span>                :       template&lt;typename _InputIterator&gt;
<span class="lineNum">     200 </span>                :         map(_InputIterator __first, _InputIterator __last)
<span class="lineNum">     201 </span>                :         : _M_t()
<span class="lineNum">     202 </span>                :         { _M_t._M_insert_unique(__first, __last); }
<span class="lineNum">     203 </span>                : 
<span class="lineNum">     204 </span>                :       /**
<span class="lineNum">     205 </span>                :        *  @brief  Builds a %map from a range.
<span class="lineNum">     206 </span>                :        *  @param  first  An input iterator.
<span class="lineNum">     207 </span>                :        *  @param  last  An input iterator.
<span class="lineNum">     208 </span>                :        *  @param  comp  A comparison functor.
<span class="lineNum">     209 </span>                :        *  @param  a  An allocator object.
<span class="lineNum">     210 </span>                :        *
<span class="lineNum">     211 </span>                :        *  Create a %map consisting of copies of the elements from [first,last).
<span class="lineNum">     212 </span>                :        *  This is linear in N if the range is already sorted, and NlogN
<span class="lineNum">     213 </span>                :        *  otherwise (where N is distance(first,last)).
<span class="lineNum">     214 </span>                :        */
<span class="lineNum">     215 </span>                :       template&lt;typename _InputIterator&gt;
<span class="lineNum">     216 </span>                :         map(_InputIterator __first, _InputIterator __last,
<span class="lineNum">     217 </span>                :             const _Compare&amp; __comp,
<span class="lineNum">     218 </span>                :             const allocator_type&amp; __a = allocator_type())
<span class="lineNum">     219 </span>                :         : _M_t(__comp, __a)
<span class="lineNum">     220 </span>                :         { _M_t._M_insert_unique(__first, __last); }
<span class="lineNum">     221 </span>                : 
<span class="lineNum">     222 </span>                :       // FIXME There is no dtor declared, but we should have something
<span class="lineNum">     223 </span>                :       // generated by Doxygen.  I don't know what tags to add to this
<span class="lineNum">     224 </span>                :       // paragraph to make that happen:
<span class="lineNum">     225 </span>                :       /**
<span class="lineNum">     226 </span>                :        *  The dtor only erases the elements, and note that if the elements
<span class="lineNum">     227 </span>                :        *  themselves are pointers, the pointed-to memory is not touched in any
<span class="lineNum">     228 </span>                :        *  way.  Managing the pointer is the user's responsibility.
<span class="lineNum">     229 </span>                :        */
<span class="lineNum">     230 </span>                : 
<span class="lineNum">     231 </span>                :       /**
<span class="lineNum">     232 </span>                :        *  @brief  %Map assignment operator.
<span class="lineNum">     233 </span>                :        *  @param  x  A %map of identical element and allocator types.
<span class="lineNum">     234 </span>                :        *
<span class="lineNum">     235 </span>                :        *  All the elements of @a x are copied, but unlike the copy constructor,
<span class="lineNum">     236 </span>                :        *  the allocator object is not copied.
<span class="lineNum">     237 </span>                :        */
<span class="lineNum">     238 </span>                :       map&amp;
<span class="lineNum">     239 </span>                :       operator=(const map&amp; __x)
<span class="lineNum">     240 </span>                :       {
<span class="lineNum">     241 </span>                :         _M_t = __x._M_t;
<span class="lineNum">     242 </span>                :         return *this;
<span class="lineNum">     243 </span>                :       }
<span class="lineNum">     244 </span>                : 
<span class="lineNum">     245 </span>                : #ifdef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     246 </span>                :       /**
<span class="lineNum">     247 </span>                :        *  @brief  %Map move assignment operator.
<span class="lineNum">     248 </span>                :        *  @param  x  A %map of identical element and allocator types.
<span class="lineNum">     249 </span>                :        *
<span class="lineNum">     250 </span>                :        *  The contents of @a x are moved into this map (without copying).
<span class="lineNum">     251 </span>                :        *  @a x is a valid, but unspecified %map.
<span class="lineNum">     252 </span>                :        */
<span class="lineNum">     253 </span>                :       map&amp;
<span class="lineNum">     254 </span>                :       operator=(map&amp;&amp; __x)
<span class="lineNum">     255 </span>                :       {
<span class="lineNum">     256 </span>                :         // NB: DR 675.
<span class="lineNum">     257 </span>                :         this-&gt;clear();
<span class="lineNum">     258 </span>                :         this-&gt;swap(__x); 
<span class="lineNum">     259 </span>                :         return *this;
<span class="lineNum">     260 </span>                :       }
<span class="lineNum">     261 </span>                : #endif
<span class="lineNum">     262 </span>                : 
<span class="lineNum">     263 </span>                :       /// Get a copy of the memory allocation object.
<span class="lineNum">     264 </span>                :       allocator_type
<span class="lineNum">     265 </span>                :       get_allocator() const
<span class="lineNum">     266 </span>                :       { return _M_t.get_allocator(); }
<span class="lineNum">     267 </span>                : 
<span class="lineNum">     268 </span>                :       // iterators
<span class="lineNum">     269 </span>                :       /**
<span class="lineNum">     270 </span>                :        *  Returns a read/write iterator that points to the first pair in the
<span class="lineNum">     271 </span>                :        *  %map.
<span class="lineNum">     272 </span>                :        *  Iteration is done in ascending order according to the keys.
<span class="lineNum">     273 </span>                :        */
<span class="lineNum">     274 </span>                :       iterator
<span class="lineNum">     275 </span><span class="lineCov">             13 :       begin()</span>
<span class="lineNum">     276 </span><span class="lineCov">             13 :       { return _M_t.begin(); }</span>
<span class="lineNum">     277 </span>                : 
<span class="lineNum">     278 </span>                :       /**
<span class="lineNum">     279 </span>                :        *  Returns a read-only (constant) iterator that points to the first pair
<span class="lineNum">     280 </span>                :        *  in the %map.  Iteration is done in ascending order according to the
<span class="lineNum">     281 </span>                :        *  keys.
<span class="lineNum">     282 </span>                :        */
<span class="lineNum">     283 </span>                :       const_iterator
<span class="lineNum">     284 </span>                :       begin() const
<span class="lineNum">     285 </span>                :       { return _M_t.begin(); }
<span class="lineNum">     286 </span>                : 
<span class="lineNum">     287 </span>                :       /**
<span class="lineNum">     288 </span>                :        *  Returns a read/write iterator that points one past the last
<span class="lineNum">     289 </span>                :        *  pair in the %map.  Iteration is done in ascending order
<span class="lineNum">     290 </span>                :        *  according to the keys.
<span class="lineNum">     291 </span>                :        */
<span class="lineNum">     292 </span>                :       iterator
<span class="lineNum">     293 </span><span class="lineCov">            144 :       end()</span>
<span class="lineNum">     294 </span><span class="lineCov">            144 :       { return _M_t.end(); }</span>
<span class="lineNum">     295 </span>                : 
<span class="lineNum">     296 </span>                :       /**
<span class="lineNum">     297 </span>                :        *  Returns a read-only (constant) iterator that points one past the last
<span class="lineNum">     298 </span>                :        *  pair in the %map.  Iteration is done in ascending order according to
<span class="lineNum">     299 </span>                :        *  the keys.
<span class="lineNum">     300 </span>                :        */
<span class="lineNum">     301 </span>                :       const_iterator
<span class="lineNum">     302 </span>                :       end() const
<span class="lineNum">     303 </span>                :       { return _M_t.end(); }
<span class="lineNum">     304 </span>                : 
<span class="lineNum">     305 </span>                :       /**
<span class="lineNum">     306 </span>                :        *  Returns a read/write reverse iterator that points to the last pair in
<span class="lineNum">     307 </span>                :        *  the %map.  Iteration is done in descending order according to the
<span class="lineNum">     308 </span>                :        *  keys.
<span class="lineNum">     309 </span>                :        */
<span class="lineNum">     310 </span>                :       reverse_iterator
<span class="lineNum">     311 </span>                :       rbegin()
<span class="lineNum">     312 </span>                :       { return _M_t.rbegin(); }
<span class="lineNum">     313 </span>                : 
<span class="lineNum">     314 </span>                :       /**
<span class="lineNum">     315 </span>                :        *  Returns a read-only (constant) reverse iterator that points to the
<span class="lineNum">     316 </span>                :        *  last pair in the %map.  Iteration is done in descending order
<span class="lineNum">     317 </span>                :        *  according to the keys.
<span class="lineNum">     318 </span>                :        */
<span class="lineNum">     319 </span>                :       const_reverse_iterator
<span class="lineNum">     320 </span>                :       rbegin() const
<span class="lineNum">     321 </span>                :       { return _M_t.rbegin(); }
<span class="lineNum">     322 </span>                : 
<span class="lineNum">     323 </span>                :       /**
<span class="lineNum">     324 </span>                :        *  Returns a read/write reverse iterator that points to one before the
<span class="lineNum">     325 </span>                :        *  first pair in the %map.  Iteration is done in descending order
<span class="lineNum">     326 </span>                :        *  according to the keys.
<span class="lineNum">     327 </span>                :        */
<span class="lineNum">     328 </span>                :       reverse_iterator
<span class="lineNum">     329 </span>                :       rend()
<span class="lineNum">     330 </span>                :       { return _M_t.rend(); }
<span class="lineNum">     331 </span>                : 
<span class="lineNum">     332 </span>                :       /**
<span class="lineNum">     333 </span>                :        *  Returns a read-only (constant) reverse iterator that points to one
<span class="lineNum">     334 </span>                :        *  before the first pair in the %map.  Iteration is done in descending
<span class="lineNum">     335 </span>                :        *  order according to the keys.
<span class="lineNum">     336 </span>                :        */
<span class="lineNum">     337 </span>                :       const_reverse_iterator
<span class="lineNum">     338 </span>                :       rend() const
<span class="lineNum">     339 </span>                :       { return _M_t.rend(); }
<span class="lineNum">     340 </span>                : 
<span class="lineNum">     341 </span>                : #ifdef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     342 </span>                :       /**
<span class="lineNum">     343 </span>                :        *  Returns a read-only (constant) iterator that points to the first pair
<span class="lineNum">     344 </span>                :        *  in the %map.  Iteration is done in ascending order according to the
<span class="lineNum">     345 </span>                :        *  keys.
<span class="lineNum">     346 </span>                :        */
<span class="lineNum">     347 </span>                :       const_iterator
<span class="lineNum">     348 </span>                :       cbegin() const
<span class="lineNum">     349 </span>                :       { return _M_t.begin(); }
<span class="lineNum">     350 </span>                : 
<span class="lineNum">     351 </span>                :       /**
<span class="lineNum">     352 </span>                :        *  Returns a read-only (constant) iterator that points one past the last
<span class="lineNum">     353 </span>                :        *  pair in the %map.  Iteration is done in ascending order according to
<span class="lineNum">     354 </span>                :        *  the keys.
<span class="lineNum">     355 </span>                :        */
<span class="lineNum">     356 </span>                :       const_iterator
<span class="lineNum">     357 </span>                :       cend() const
<span class="lineNum">     358 </span>                :       { return _M_t.end(); }
<span class="lineNum">     359 </span>                : 
<span class="lineNum">     360 </span>                :       /**
<span class="lineNum">     361 </span>                :        *  Returns a read-only (constant) reverse iterator that points to the
<span class="lineNum">     362 </span>                :        *  last pair in the %map.  Iteration is done in descending order
<span class="lineNum">     363 </span>                :        *  according to the keys.
<span class="lineNum">     364 </span>                :        */
<span class="lineNum">     365 </span>                :       const_reverse_iterator
<span class="lineNum">     366 </span>                :       crbegin() const
<span class="lineNum">     367 </span>                :       { return _M_t.rbegin(); }
<span class="lineNum">     368 </span>                : 
<span class="lineNum">     369 </span>                :       /**
<span class="lineNum">     370 </span>                :        *  Returns a read-only (constant) reverse iterator that points to one
<span class="lineNum">     371 </span>                :        *  before the first pair in the %map.  Iteration is done in descending
<span class="lineNum">     372 </span>                :        *  order according to the keys.
<span class="lineNum">     373 </span>                :        */
<span class="lineNum">     374 </span>                :       const_reverse_iterator
<span class="lineNum">     375 </span>                :       crend() const
<span class="lineNum">     376 </span>                :       { return _M_t.rend(); }
<span class="lineNum">     377 </span>                : #endif
<span class="lineNum">     378 </span>                : 
<span class="lineNum">     379 </span>                :       // capacity
<span class="lineNum">     380 </span>                :       /** Returns true if the %map is empty.  (Thus begin() would equal
<span class="lineNum">     381 </span>                :        *  end().)
<span class="lineNum">     382 </span>                :       */
<span class="lineNum">     383 </span>                :       bool
<span class="lineNum">     384 </span><span class="lineCov">             15 :       empty() const</span>
<span class="lineNum">     385 </span><span class="lineCov">             15 :       { return _M_t.empty(); }</span>
<span class="lineNum">     386 </span>                : 
<span class="lineNum">     387 </span>                :       /** Returns the size of the %map.  */
<span class="lineNum">     388 </span>                :       size_type
<span class="lineNum">     389 </span><span class="lineNoCov">              0 :       size() const</span>
<span class="lineNum">     390 </span><span class="lineNoCov">              0 :       { return _M_t.size(); }</span>
<span class="lineNum">     391 </span>                : 
<span class="lineNum">     392 </span>                :       /** Returns the maximum size of the %map.  */
<span class="lineNum">     393 </span>                :       size_type
<span class="lineNum">     394 </span>                :       max_size() const
<span class="lineNum">     395 </span>                :       { return _M_t.max_size(); }
<span class="lineNum">     396 </span>                : 
<span class="lineNum">     397 </span>                :       // [23.3.1.2] element access
<span class="lineNum">     398 </span>                :       /**
<span class="lineNum">     399 </span>                :        *  @brief  Subscript ( @c [] ) access to %map data.
<span class="lineNum">     400 </span>                :        *  @param  k  The key for which data should be retrieved.
<span class="lineNum">     401 </span>                :        *  @return  A reference to the data of the (key,data) %pair.
<span class="lineNum">     402 </span>                :        *
<span class="lineNum">     403 </span>                :        *  Allows for easy lookup with the subscript ( @c [] )
<span class="lineNum">     404 </span>                :        *  operator.  Returns data associated with the key specified in
<span class="lineNum">     405 </span>                :        *  subscript.  If the key does not exist, a pair with that key
<span class="lineNum">     406 </span>                :        *  is created using default values, which is then returned.
<span class="lineNum">     407 </span>                :        *
<span class="lineNum">     408 </span>                :        *  Lookup requires logarithmic time.
<span class="lineNum">     409 </span>                :        */
<span class="lineNum">     410 </span>                :       mapped_type&amp;
<span class="lineNum">     411 </span><span class="lineCov">            144 :       operator[](const key_type&amp; __k)</span>
<span class="lineNum">     412 </span>                :       {
<span class="lineNum">     413 </span>                :         // concept requirements
<span class="lineNum">     414 </span>                :         __glibcxx_function_requires(_DefaultConstructibleConcept&lt;mapped_type&gt;)
<span class="lineNum">     415 </span>                : 
<span class="lineNum">     416 </span><span class="lineCov">            144 :         iterator __i = lower_bound(__k);</span>
<span class="lineNum">     417 </span>                :         // __i-&gt;first is greater than or equivalent to __k.
<span class="lineNum">     418 </span><span class="lineCov">            144 :         if (__i == end() || key_comp()(__k, (*__i).first))</span>
<span class="lineNum">     419 </span><span class="lineCov">             49 :           __i = insert(__i, value_type(__k, mapped_type()));</span>
<span class="lineNum">     420 </span><span class="lineCov">            144 :         return (*__i).second;</span>
<span class="lineNum">     421 </span>                :       }
<span class="lineNum">     422 </span>                : 
<span class="lineNum">     423 </span>                :       // _GLIBCXX_RESOLVE_LIB_DEFECTS
<span class="lineNum">     424 </span>                :       // DR 464. Suggestion for new member functions in standard containers.
<span class="lineNum">     425 </span>                :       /**
<span class="lineNum">     426 </span>                :        *  @brief  Access to %map data.
<span class="lineNum">     427 </span>                :        *  @param  k  The key for which data should be retrieved.
<span class="lineNum">     428 </span>                :        *  @return  A reference to the data whose key is equivalent to @a k, if
<span class="lineNum">     429 </span>                :        *           such a data is present in the %map.
<span class="lineNum">     430 </span>                :        *  @throw  std::out_of_range  If no such data is present.
<span class="lineNum">     431 </span>                :        */
<span class="lineNum">     432 </span>                :       mapped_type&amp;
<span class="lineNum">     433 </span>                :       at(const key_type&amp; __k)
<span class="lineNum">     434 </span>                :       {
<span class="lineNum">     435 </span>                :         iterator __i = lower_bound(__k);
<span class="lineNum">     436 </span>                :         if (__i == end() || key_comp()(__k, (*__i).first))
<span class="lineNum">     437 </span>                :           __throw_out_of_range(__N(&quot;map::at&quot;));
<span class="lineNum">     438 </span>                :         return (*__i).second;
<span class="lineNum">     439 </span>                :       }
<span class="lineNum">     440 </span>                : 
<span class="lineNum">     441 </span>                :       const mapped_type&amp;
<span class="lineNum">     442 </span>                :       at(const key_type&amp; __k) const
<span class="lineNum">     443 </span>                :       {
<span class="lineNum">     444 </span>                :         const_iterator __i = lower_bound(__k);
<span class="lineNum">     445 </span>                :         if (__i == end() || key_comp()(__k, (*__i).first))
<span class="lineNum">     446 </span>                :           __throw_out_of_range(__N(&quot;map::at&quot;));
<span class="lineNum">     447 </span>                :         return (*__i).second;
<span class="lineNum">     448 </span>                :       }
<span class="lineNum">     449 </span>                : 
<span class="lineNum">     450 </span>                :       // modifiers
<span class="lineNum">     451 </span>                :       /**
<span class="lineNum">     452 </span>                :        *  @brief Attempts to insert a std::pair into the %map.
<span class="lineNum">     453 </span>                : 
<span class="lineNum">     454 </span>                :        *  @param  x  Pair to be inserted (see std::make_pair for easy creation 
<span class="lineNum">     455 </span>                :        *             of pairs).
<span class="lineNum">     456 </span>                : 
<span class="lineNum">     457 </span>                :        *  @return  A pair, of which the first element is an iterator that 
<span class="lineNum">     458 </span>                :        *           points to the possibly inserted pair, and the second is 
<span class="lineNum">     459 </span>                :        *           a bool that is true if the pair was actually inserted.
<span class="lineNum">     460 </span>                :        *
<span class="lineNum">     461 </span>                :        *  This function attempts to insert a (key, value) %pair into the %map.
<span class="lineNum">     462 </span>                :        *  A %map relies on unique keys and thus a %pair is only inserted if its
<span class="lineNum">     463 </span>                :        *  first element (the key) is not already present in the %map.
<span class="lineNum">     464 </span>                :        *
<span class="lineNum">     465 </span>                :        *  Insertion requires logarithmic time.
<span class="lineNum">     466 </span>                :        */
<span class="lineNum">     467 </span>                :       std::pair&lt;iterator, bool&gt;
<span class="lineNum">     468 </span><span class="lineCov">             13 :       insert(const value_type&amp; __x)</span>
<span class="lineNum">     469 </span><span class="lineCov">             13 :       { return _M_t._M_insert_unique(__x); }</span>
<span class="lineNum">     470 </span>                : 
<span class="lineNum">     471 </span>                :       /**
<span class="lineNum">     472 </span>                :        *  @brief Attempts to insert a std::pair into the %map.
<span class="lineNum">     473 </span>                :        *  @param  position  An iterator that serves as a hint as to where the
<span class="lineNum">     474 </span>                :        *                    pair should be inserted.
<span class="lineNum">     475 </span>                :        *  @param  x  Pair to be inserted (see std::make_pair for easy creation
<span class="lineNum">     476 </span>                :        *             of pairs).
<span class="lineNum">     477 </span>                :        *  @return  An iterator that points to the element with key of @a x (may
<span class="lineNum">     478 </span>                :        *           or may not be the %pair passed in).
<span class="lineNum">     479 </span>                :        *
<span class="lineNum">     480 </span>                : 
<span class="lineNum">     481 </span>                :        *  This function is not concerned about whether the insertion
<span class="lineNum">     482 </span>                :        *  took place, and thus does not return a boolean like the
<span class="lineNum">     483 </span>                :        *  single-argument insert() does.  Note that the first
<span class="lineNum">     484 </span>                :        *  parameter is only a hint and can potentially improve the
<span class="lineNum">     485 </span>                :        *  performance of the insertion process.  A bad hint would
<span class="lineNum">     486 </span>                :        *  cause no gains in efficiency.
<span class="lineNum">     487 </span>                :        *
<span class="lineNum">     488 </span>                :        *  See
<span class="lineNum">     489 </span>                :        *  http://gcc.gnu.org/onlinedocs/libstdc++/23_containers/howto.html#4
<span class="lineNum">     490 </span>                :        *  for more on &quot;hinting&quot;.
<span class="lineNum">     491 </span>                :        *
<span class="lineNum">     492 </span>                :        *  Insertion requires logarithmic time (if the hint is not taken).
<span class="lineNum">     493 </span>                :        */
<span class="lineNum">     494 </span>                :       iterator
<span class="lineNum">     495 </span><span class="lineCov">             49 :       insert(iterator __position, const value_type&amp; __x)</span>
<span class="lineNum">     496 </span><span class="lineCov">             49 :       { return _M_t._M_insert_unique_(__position, __x); }</span>
<span class="lineNum">     497 </span>                : 
<span class="lineNum">     498 </span>                :       /**
<span class="lineNum">     499 </span>                :        *  @brief Template function that attempts to insert a range of elements.
<span class="lineNum">     500 </span>                :        *  @param  first  Iterator pointing to the start of the range to be
<span class="lineNum">     501 </span>                :        *                 inserted.
<span class="lineNum">     502 </span>                :        *  @param  last  Iterator pointing to the end of the range.
<span class="lineNum">     503 </span>                :        *
<span class="lineNum">     504 </span>                :        *  Complexity similar to that of the range constructor.
<span class="lineNum">     505 </span>                :        */
<span class="lineNum">     506 </span>                :       template&lt;typename _InputIterator&gt;
<span class="lineNum">     507 </span>                :         void
<span class="lineNum">     508 </span>                :         insert(_InputIterator __first, _InputIterator __last)
<span class="lineNum">     509 </span>                :         { _M_t._M_insert_unique(__first, __last); }
<span class="lineNum">     510 </span>                : 
<span class="lineNum">     511 </span>                :       /**
<span class="lineNum">     512 </span>                :        *  @brief Erases an element from a %map.
<span class="lineNum">     513 </span>                :        *  @param  position  An iterator pointing to the element to be erased.
<span class="lineNum">     514 </span>                :        *
<span class="lineNum">     515 </span>                :        *  This function erases an element, pointed to by the given
<span class="lineNum">     516 </span>                :        *  iterator, from a %map.  Note that this function only erases
<span class="lineNum">     517 </span>                :        *  the element, and that if the element is itself a pointer,
<span class="lineNum">     518 </span>                :        *  the pointed-to memory is not touched in any way.  Managing
<span class="lineNum">     519 </span>                :        *  the pointer is the user's responsibility.
<span class="lineNum">     520 </span>                :        */
<span class="lineNum">     521 </span>                :       void
<span class="lineNum">     522 </span><span class="lineNoCov">              0 :       erase(iterator __position)</span>
<span class="lineNum">     523 </span><span class="lineNoCov">              0 :       { _M_t.erase(__position); }</span>
<span class="lineNum">     524 </span>                : 
<span class="lineNum">     525 </span>                :       /**
<span class="lineNum">     526 </span>                :        *  @brief Erases elements according to the provided key.
<span class="lineNum">     527 </span>                :        *  @param  x  Key of element to be erased.
<span class="lineNum">     528 </span>                :        *  @return  The number of elements erased.
<span class="lineNum">     529 </span>                :        *
<span class="lineNum">     530 </span>                :        *  This function erases all the elements located by the given key from
<span class="lineNum">     531 </span>                :        *  a %map.
<span class="lineNum">     532 </span>                :        *  Note that this function only erases the element, and that if
<span class="lineNum">     533 </span>                :        *  the element is itself a pointer, the pointed-to memory is not touched
<span class="lineNum">     534 </span>                :        *  in any way.  Managing the pointer is the user's responsibility.
<span class="lineNum">     535 </span>                :        */
<span class="lineNum">     536 </span>                :       size_type
<span class="lineNum">     537 </span><span class="lineCov">             13 :       erase(const key_type&amp; __x)</span>
<span class="lineNum">     538 </span><span class="lineCov">             13 :       { return _M_t.erase(__x); }</span>
<span class="lineNum">     539 </span>                : 
<span class="lineNum">     540 </span>                :       /**
<span class="lineNum">     541 </span>                :        *  @brief Erases a [first,last) range of elements from a %map.
<span class="lineNum">     542 </span>                :        *  @param  first  Iterator pointing to the start of the range to be
<span class="lineNum">     543 </span>                :        *                 erased.
<span class="lineNum">     544 </span>                :        *  @param  last  Iterator pointing to the end of the range to be erased.
<span class="lineNum">     545 </span>                :        *
<span class="lineNum">     546 </span>                :        *  This function erases a sequence of elements from a %map.
<span class="lineNum">     547 </span>                :        *  Note that this function only erases the element, and that if
<span class="lineNum">     548 </span>                :        *  the element is itself a pointer, the pointed-to memory is not touched
<span class="lineNum">     549 </span>                :        *  in any way.  Managing the pointer is the user's responsibility.
<span class="lineNum">     550 </span>                :        */
<span class="lineNum">     551 </span>                :       void
<span class="lineNum">     552 </span>                :       erase(iterator __first, iterator __last)
<span class="lineNum">     553 </span>                :       { _M_t.erase(__first, __last); }
<span class="lineNum">     554 </span>                : 
<span class="lineNum">     555 </span>                :       /**
<span class="lineNum">     556 </span>                :        *  @brief  Swaps data with another %map.
<span class="lineNum">     557 </span>                :        *  @param  x  A %map of the same element and allocator types.
<span class="lineNum">     558 </span>                :        *
<span class="lineNum">     559 </span>                :        *  This exchanges the elements between two maps in constant
<span class="lineNum">     560 </span>                :        *  time.  (It is only swapping a pointer, an integer, and an
<span class="lineNum">     561 </span>                :        *  instance of the @c Compare type (which itself is often
<span class="lineNum">     562 </span>                :        *  stateless and empty), so it should be quite fast.)  Note
<span class="lineNum">     563 </span>                :        *  that the global std::swap() function is specialized such
<span class="lineNum">     564 </span>                :        *  that std::swap(m1,m2) will feed to this function.
<span class="lineNum">     565 </span>                :        */
<span class="lineNum">     566 </span>                :       void
<span class="lineNum">     567 </span>                : #ifdef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     568 </span>                :       swap(map&amp;&amp; __x)
<span class="lineNum">     569 </span>                : #else
<span class="lineNum">     570 </span>                :       swap(map&amp; __x)
<span class="lineNum">     571 </span>                : #endif
<span class="lineNum">     572 </span>                :       { _M_t.swap(__x._M_t); }
<span class="lineNum">     573 </span>                : 
<span class="lineNum">     574 </span>                :       /**
<span class="lineNum">     575 </span>                :        *  Erases all elements in a %map.  Note that this function only
<span class="lineNum">     576 </span>                :        *  erases the elements, and that if the elements themselves are
<span class="lineNum">     577 </span>                :        *  pointers, the pointed-to memory is not touched in any way.
<span class="lineNum">     578 </span>                :        *  Managing the pointer is the user's responsibility.
<span class="lineNum">     579 </span>                :        */
<span class="lineNum">     580 </span>                :       void
<span class="lineNum">     581 </span><span class="lineCov">              2 :       clear()</span>
<span class="lineNum">     582 </span><span class="lineCov">              2 :       { _M_t.clear(); }</span>
<span class="lineNum">     583 </span>                : 
<span class="lineNum">     584 </span>                :       // observers
<span class="lineNum">     585 </span>                :       /**
<span class="lineNum">     586 </span>                :        *  Returns the key comparison object out of which the %map was
<span class="lineNum">     587 </span>                :        *  constructed.
<span class="lineNum">     588 </span>                :        */
<span class="lineNum">     589 </span>                :       key_compare
<span class="lineNum">     590 </span><span class="lineCov">            119 :       key_comp() const</span>
<span class="lineNum">     591 </span><span class="lineCov">            119 :       { return _M_t.key_comp(); }</span>
<span class="lineNum">     592 </span>                : 
<span class="lineNum">     593 </span>                :       /**
<span class="lineNum">     594 </span>                :        *  Returns a value comparison object, built from the key comparison
<span class="lineNum">     595 </span>                :        *  object out of which the %map was constructed.
<span class="lineNum">     596 </span>                :        */
<span class="lineNum">     597 </span>                :       value_compare
<span class="lineNum">     598 </span>                :       value_comp() const
<span class="lineNum">     599 </span>                :       { return value_compare(_M_t.key_comp()); }
<span class="lineNum">     600 </span>                : 
<span class="lineNum">     601 </span>                :       // [23.3.1.3] map operations
<span class="lineNum">     602 </span>                :       /**
<span class="lineNum">     603 </span>                :        *  @brief Tries to locate an element in a %map.
<span class="lineNum">     604 </span>                :        *  @param  x  Key of (key, value) %pair to be located.
<span class="lineNum">     605 </span>                :        *  @return  Iterator pointing to sought-after element, or end() if not
<span class="lineNum">     606 </span>                :        *           found.
<span class="lineNum">     607 </span>                :        *
<span class="lineNum">     608 </span>                :        *  This function takes a key and tries to locate the element with which
<span class="lineNum">     609 </span>                :        *  the key matches.  If successful the function returns an iterator
<span class="lineNum">     610 </span>                :        *  pointing to the sought after %pair.  If unsuccessful it returns the
<span class="lineNum">     611 </span>                :        *  past-the-end ( @c end() ) iterator.
<span class="lineNum">     612 </span>                :        */
<span class="lineNum">     613 </span>                :       iterator
<span class="lineNum">     614 </span><span class="lineNoCov">              0 :       find(const key_type&amp; __x)</span>
<span class="lineNum">     615 </span><span class="lineNoCov">              0 :       { return _M_t.find(__x); }</span>
<span class="lineNum">     616 </span>                : 
<span class="lineNum">     617 </span>                :       /**
<span class="lineNum">     618 </span>                :        *  @brief Tries to locate an element in a %map.
<span class="lineNum">     619 </span>                :        *  @param  x  Key of (key, value) %pair to be located.
<span class="lineNum">     620 </span>                :        *  @return  Read-only (constant) iterator pointing to sought-after
<span class="lineNum">     621 </span>                :        *           element, or end() if not found.
<span class="lineNum">     622 </span>                :        *
<span class="lineNum">     623 </span>                :        *  This function takes a key and tries to locate the element with which
<span class="lineNum">     624 </span>                :        *  the key matches.  If successful the function returns a constant
<span class="lineNum">     625 </span>                :        *  iterator pointing to the sought after %pair. If unsuccessful it
<span class="lineNum">     626 </span>                :        *  returns the past-the-end ( @c end() ) iterator.
<span class="lineNum">     627 </span>                :        */
<span class="lineNum">     628 </span>                :       const_iterator
<span class="lineNum">     629 </span>                :       find(const key_type&amp; __x) const
<span class="lineNum">     630 </span>                :       { return _M_t.find(__x); }
<span class="lineNum">     631 </span>                : 
<span class="lineNum">     632 </span>                :       /**
<span class="lineNum">     633 </span>                :        *  @brief  Finds the number of elements with given key.
<span class="lineNum">     634 </span>                :        *  @param  x  Key of (key, value) pairs to be located.
<span class="lineNum">     635 </span>                :        *  @return  Number of elements with specified key.
<span class="lineNum">     636 </span>                :        *
<span class="lineNum">     637 </span>                :        *  This function only makes sense for multimaps; for map the result will
<span class="lineNum">     638 </span>                :        *  either be 0 (not present) or 1 (present).
<span class="lineNum">     639 </span>                :        */
<span class="lineNum">     640 </span>                :       size_type
<span class="lineNum">     641 </span>                :       count(const key_type&amp; __x) const
<span class="lineNum">     642 </span>                :       { return _M_t.find(__x) == _M_t.end() ? 0 : 1; }
<span class="lineNum">     643 </span>                : 
<span class="lineNum">     644 </span>                :       /**
<span class="lineNum">     645 </span>                :        *  @brief Finds the beginning of a subsequence matching given key.
<span class="lineNum">     646 </span>                :        *  @param  x  Key of (key, value) pair to be located.
<span class="lineNum">     647 </span>                :        *  @return  Iterator pointing to first element equal to or greater
<span class="lineNum">     648 </span>                :        *           than key, or end().
<span class="lineNum">     649 </span>                :        *
<span class="lineNum">     650 </span>                :        *  This function returns the first element of a subsequence of elements
<span class="lineNum">     651 </span>                :        *  that matches the given key.  If unsuccessful it returns an iterator
<span class="lineNum">     652 </span>                :        *  pointing to the first element that has a greater value than given key
<span class="lineNum">     653 </span>                :        *  or end() if no such element exists.
<span class="lineNum">     654 </span>                :        */
<span class="lineNum">     655 </span>                :       iterator
<span class="lineNum">     656 </span><span class="lineCov">            144 :       lower_bound(const key_type&amp; __x)</span>
<span class="lineNum">     657 </span><span class="lineCov">            144 :       { return _M_t.lower_bound(__x); }</span>
<span class="lineNum">     658 </span>                : 
<span class="lineNum">     659 </span>                :       /**
<span class="lineNum">     660 </span>                :        *  @brief Finds the beginning of a subsequence matching given key.
<span class="lineNum">     661 </span>                :        *  @param  x  Key of (key, value) pair to be located.
<span class="lineNum">     662 </span>                :        *  @return  Read-only (constant) iterator pointing to first element
<span class="lineNum">     663 </span>                :        *           equal to or greater than key, or end().
<span class="lineNum">     664 </span>                :        *
<span class="lineNum">     665 </span>                :        *  This function returns the first element of a subsequence of elements
<span class="lineNum">     666 </span>                :        *  that matches the given key.  If unsuccessful it returns an iterator
<span class="lineNum">     667 </span>                :        *  pointing to the first element that has a greater value than given key
<span class="lineNum">     668 </span>                :        *  or end() if no such element exists.
<span class="lineNum">     669 </span>                :        */
<span class="lineNum">     670 </span>                :       const_iterator
<span class="lineNum">     671 </span>                :       lower_bound(const key_type&amp; __x) const
<span class="lineNum">     672 </span>                :       { return _M_t.lower_bound(__x); }
<span class="lineNum">     673 </span>                : 
<span class="lineNum">     674 </span>                :       /**
<span class="lineNum">     675 </span>                :        *  @brief Finds the end of a subsequence matching given key.
<span class="lineNum">     676 </span>                :        *  @param  x  Key of (key, value) pair to be located.
<span class="lineNum">     677 </span>                :        *  @return Iterator pointing to the first element
<span class="lineNum">     678 </span>                :        *          greater than key, or end().
<span class="lineNum">     679 </span>                :        */
<span class="lineNum">     680 </span>                :       iterator
<span class="lineNum">     681 </span>                :       upper_bound(const key_type&amp; __x)
<span class="lineNum">     682 </span>                :       { return _M_t.upper_bound(__x); }
<span class="lineNum">     683 </span>                : 
<span class="lineNum">     684 </span>                :       /**
<span class="lineNum">     685 </span>                :        *  @brief Finds the end of a subsequence matching given key.
<span class="lineNum">     686 </span>                :        *  @param  x  Key of (key, value) pair to be located.
<span class="lineNum">     687 </span>                :        *  @return  Read-only (constant) iterator pointing to first iterator
<span class="lineNum">     688 </span>                :        *           greater than key, or end().
<span class="lineNum">     689 </span>                :        */
<span class="lineNum">     690 </span>                :       const_iterator
<span class="lineNum">     691 </span>                :       upper_bound(const key_type&amp; __x) const
<span class="lineNum">     692 </span>                :       { return _M_t.upper_bound(__x); }
<span class="lineNum">     693 </span>                : 
<span class="lineNum">     694 </span>                :       /**
<span class="lineNum">     695 </span>                :        *  @brief Finds a subsequence matching given key.
<span class="lineNum">     696 </span>                :        *  @param  x  Key of (key, value) pairs to be located.
<span class="lineNum">     697 </span>                :        *  @return  Pair of iterators that possibly points to the subsequence
<span class="lineNum">     698 </span>                :        *           matching given key.
<span class="lineNum">     699 </span>                :        *
<span class="lineNum">     700 </span>                :        *  This function is equivalent to
<span class="lineNum">     701 </span>                :        *  @code
<span class="lineNum">     702 </span>                :        *    std::make_pair(c.lower_bound(val),
<span class="lineNum">     703 </span>                :        *                   c.upper_bound(val))
<span class="lineNum">     704 </span>                :        *  @endcode
<span class="lineNum">     705 </span>                :        *  (but is faster than making the calls separately).
<span class="lineNum">     706 </span>                :        *
<span class="lineNum">     707 </span>                :        *  This function probably only makes sense for multimaps.
<span class="lineNum">     708 </span>                :        */
<span class="lineNum">     709 </span>                :       std::pair&lt;iterator, iterator&gt;
<span class="lineNum">     710 </span>                :       equal_range(const key_type&amp; __x)
<span class="lineNum">     711 </span>                :       { return _M_t.equal_range(__x); }
<span class="lineNum">     712 </span>                : 
<span class="lineNum">     713 </span>                :       /**
<span class="lineNum">     714 </span>                :        *  @brief Finds a subsequence matching given key.
<span class="lineNum">     715 </span>                :        *  @param  x  Key of (key, value) pairs to be located.
<span class="lineNum">     716 </span>                :        *  @return  Pair of read-only (constant) iterators that possibly points
<span class="lineNum">     717 </span>                :        *           to the subsequence matching given key.
<span class="lineNum">     718 </span>                :        *
<span class="lineNum">     719 </span>                :        *  This function is equivalent to
<span class="lineNum">     720 </span>                :        *  @code
<span class="lineNum">     721 </span>                :        *    std::make_pair(c.lower_bound(val),
<span class="lineNum">     722 </span>                :        *                   c.upper_bound(val))
<span class="lineNum">     723 </span>                :        *  @endcode
<span class="lineNum">     724 </span>                :        *  (but is faster than making the calls separately).
<span class="lineNum">     725 </span>                :        *
<span class="lineNum">     726 </span>                :        *  This function probably only makes sense for multimaps.
<span class="lineNum">     727 </span>                :        */
<span class="lineNum">     728 </span>                :       std::pair&lt;const_iterator, const_iterator&gt;
<span class="lineNum">     729 </span>                :       equal_range(const key_type&amp; __x) const
<span class="lineNum">     730 </span>                :       { return _M_t.equal_range(__x); }
<span class="lineNum">     731 </span>                : 
<span class="lineNum">     732 </span>                :       template&lt;typename _K1, typename _T1, typename _C1, typename _A1&gt;
<span class="lineNum">     733 </span>                :         friend bool
<span class="lineNum">     734 </span>                :         operator==(const map&lt;_K1, _T1, _C1, _A1&gt;&amp;,
<span class="lineNum">     735 </span>                :                    const map&lt;_K1, _T1, _C1, _A1&gt;&amp;);
<span class="lineNum">     736 </span>                : 
<span class="lineNum">     737 </span>                :       template&lt;typename _K1, typename _T1, typename _C1, typename _A1&gt;
<span class="lineNum">     738 </span>                :         friend bool
<span class="lineNum">     739 </span>                :         operator&lt;(const map&lt;_K1, _T1, _C1, _A1&gt;&amp;,
<span class="lineNum">     740 </span>                :                   const map&lt;_K1, _T1, _C1, _A1&gt;&amp;);
<span class="lineNum">     741 </span>                :     };
<span class="lineNum">     742 </span>                : 
<span class="lineNum">     743 </span>                :   /**
<span class="lineNum">     744 </span>                :    *  @brief  Map equality comparison.
<span class="lineNum">     745 </span>                :    *  @param  x  A %map.
<span class="lineNum">     746 </span>                :    *  @param  y  A %map of the same type as @a x.
<span class="lineNum">     747 </span>                :    *  @return  True iff the size and elements of the maps are equal.
<span class="lineNum">     748 </span>                :    *
<span class="lineNum">     749 </span>                :    *  This is an equivalence relation.  It is linear in the size of the
<span class="lineNum">     750 </span>                :    *  maps.  Maps are considered equivalent if their sizes are equal,
<span class="lineNum">     751 </span>                :    *  and if corresponding elements compare equal.
<span class="lineNum">     752 </span>                :   */
<span class="lineNum">     753 </span>                :   template&lt;typename _Key, typename _Tp, typename _Compare, typename _Alloc&gt;
<span class="lineNum">     754 </span>                :     inline bool
<span class="lineNum">     755 </span>                :     operator==(const map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">     756 </span>                :                const map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">     757 </span>                :     { return __x._M_t == __y._M_t; }
<span class="lineNum">     758 </span>                : 
<span class="lineNum">     759 </span>                :   /**
<span class="lineNum">     760 </span>                :    *  @brief  Map ordering relation.
<span class="lineNum">     761 </span>                :    *  @param  x  A %map.
<span class="lineNum">     762 </span>                :    *  @param  y  A %map of the same type as @a x.
<span class="lineNum">     763 </span>                :    *  @return  True iff @a x is lexicographically less than @a y.
<span class="lineNum">     764 </span>                :    *
<span class="lineNum">     765 </span>                :    *  This is a total ordering relation.  It is linear in the size of the
<span class="lineNum">     766 </span>                :    *  maps.  The elements must be comparable with @c &lt;.
<span class="lineNum">     767 </span>                :    *
<span class="lineNum">     768 </span>                :    *  See std::lexicographical_compare() for how the determination is made.
<span class="lineNum">     769 </span>                :   */
<span class="lineNum">     770 </span>                :   template&lt;typename _Key, typename _Tp, typename _Compare, typename _Alloc&gt;
<span class="lineNum">     771 </span>                :     inline bool
<span class="lineNum">     772 </span>                :     operator&lt;(const map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">     773 </span>                :               const map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">     774 </span>                :     { return __x._M_t &lt; __y._M_t; }
<span class="lineNum">     775 </span>                : 
<span class="lineNum">     776 </span>                :   /// Based on operator==
<span class="lineNum">     777 </span>                :   template&lt;typename _Key, typename _Tp, typename _Compare, typename _Alloc&gt;
<span class="lineNum">     778 </span>                :     inline bool
<span class="lineNum">     779 </span>                :     operator!=(const map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">     780 </span>                :                const map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">     781 </span>                :     { return !(__x == __y); }
<span class="lineNum">     782 </span>                : 
<span class="lineNum">     783 </span>                :   /// Based on operator&lt;
<span class="lineNum">     784 </span>                :   template&lt;typename _Key, typename _Tp, typename _Compare, typename _Alloc&gt;
<span class="lineNum">     785 </span>                :     inline bool
<span class="lineNum">     786 </span>                :     operator&gt;(const map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">     787 </span>                :               const map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">     788 </span>                :     { return __y &lt; __x; }
<span class="lineNum">     789 </span>                : 
<span class="lineNum">     790 </span>                :   /// Based on operator&lt;
<span class="lineNum">     791 </span>                :   template&lt;typename _Key, typename _Tp, typename _Compare, typename _Alloc&gt;
<span class="lineNum">     792 </span>                :     inline bool
<span class="lineNum">     793 </span>                :     operator&lt;=(const map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">     794 </span>                :                const map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">     795 </span>                :     { return !(__y &lt; __x); }
<span class="lineNum">     796 </span>                : 
<span class="lineNum">     797 </span>                :   /// Based on operator&lt;
<span class="lineNum">     798 </span>                :   template&lt;typename _Key, typename _Tp, typename _Compare, typename _Alloc&gt;
<span class="lineNum">     799 </span>                :     inline bool
<span class="lineNum">     800 </span>                :     operator&gt;=(const map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">     801 </span>                :                const map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">     802 </span>                :     { return !(__x &lt; __y); }
<span class="lineNum">     803 </span>                : 
<span class="lineNum">     804 </span>                :   /// See std::map::swap().
<span class="lineNum">     805 </span>                :   template&lt;typename _Key, typename _Tp, typename _Compare, typename _Alloc&gt;
<span class="lineNum">     806 </span>                :     inline void
<span class="lineNum">     807 </span>                :     swap(map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">     808 </span>                :          map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">     809 </span>                :     { __x.swap(__y); }
<span class="lineNum">     810 </span>                : 
<span class="lineNum">     811 </span>                : #ifdef __GXX_EXPERIMENTAL_CXX0X__
<span class="lineNum">     812 </span>                :   template&lt;typename _Key, typename _Tp, typename _Compare, typename _Alloc&gt;
<span class="lineNum">     813 </span>                :     inline void
<span class="lineNum">     814 </span>                :     swap(map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp;&amp; __x,
<span class="lineNum">     815 </span>                :          map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">     816 </span>                :     { __x.swap(__y); }
<span class="lineNum">     817 </span>                : 
<span class="lineNum">     818 </span>                :   template&lt;typename _Key, typename _Tp, typename _Compare, typename _Alloc&gt;
<span class="lineNum">     819 </span>                :     inline void
<span class="lineNum">     820 </span>                :     swap(map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">     821 </span>                :          map&lt;_Key, _Tp, _Compare, _Alloc&gt;&amp;&amp; __y)
<span class="lineNum">     822 </span>                :     { __x.swap(__y); }
<span class="lineNum">     823 </span>                : #endif
<span class="lineNum">     824 </span>                : 
<span class="lineNum">     825 </span>                : _GLIBCXX_END_NESTED_NAMESPACE
<span class="lineNum">     826 </span>                : 
<span class="lineNum">     827 </span>                : #endif /* _STL_MAP_H */
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
  <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LTP GCOV extension version 1.6</a></td></tr>
  </table>
  <br>

</body>
</html>
